package iterator_pattern.exercise.exercise1;

import java.util.Arrays;
import java.util.List;

/**
 * 行政部
 * @author ricejson
 */
public class AdministratorDepartment extends Department {
    private static final List<String> employees = Arrays.asList("钱七", "孙八");

    public AdministratorDepartment(String name) {
        super(name);
    }

    public int size() {
        return employees.size();
    }

    public String get(int idx) {
        return employees.get(idx);
    }

    @Override
    public Iterator createIterator() {
        return new AdministratorDepartmentIterator(this);
    }
}
